<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="${initParam.url }/statics/css/complaint.css" rel="stylesheet">

</head>
<body>
	<div
		style="width: 1090px; height: 500px; background-color: #FFF; margin: 20px;">
		<h4
			style="background-color: #9FB2C2; padding-left: 10px; color: #516D8A; line-height: 40px;">
			<img alt="" src="${initParam.url}/statics/images/title.jpg">
			报修列表
		</h4>
		<div class="table">
		<table class="table-1" >
			<c:forEach var="com" items="${compla }">
					<tr>
						<td>
							<c:if test="${com.status==1 }">
								<img style="width: 30px;height: 30px;" alt="" src="${initParam.url}/statics/images/已读.gif">
							</c:if>
							<c:if test="${com.status==0 }">
								<img style="width: 30px;height: 30px;" alt="" src="${initParam.url}/statics/images/未读1.gif">
							</c:if>
							<a href="detail?id=${com.id }">${com.content }</a>
							
						</td>
						<td><fmt:formatDate  value="${com.dateTime }"/></td>
					</tr>
			</c:forEach>
			
		</table>
		</div>
		<div class="ta-1">
		<c:if test="${index<2 }">
			<a href="#">第一页</a>
		</c:if>
		<c:if test="${index>1 }">
			<a href="?index=1">第一页</a>
		</c:if>
		<c:if test="${index<2 }">
			<a href="#">上一页</a>
		</c:if>
		<c:if test="${index>1 }">
			<a href="?index=${index-1 }">上一页</a>
		</c:if>
			<c:if test="${index<sum }">
				<a href="?index=${index+1}">下一页</a>
			</c:if>
			<c:if test="${index==sum }">
				<a href="#">下一页</a>
			</c:if>
			<c:if test="${index==sum }">
				<a href="#">最后一页</a>
			</c:if>
			<c:if test="${sum>index }">
				<a href="?index=${sum }">最后一页</a>
			</c:if>
		</div>
	</div>
</body>
</html>